package com.anzia.demo06;

/**
 *@ClassName IntegerBuffer_Demo
 *@Description
 *@Author Anzia.
 *@Date 2021/4/11 15:00
 *@Version 1.0
 **/
public class IntegerBuffer_Demo {
    public static void main(String[] args) {
        Integer integer1 = new Integer(100);
        Integer integer2 = new Integer(100);
        System.out.println(integer1 == integer2);

        //整形缓冲区 [-128,127]
        Integer integer3 = 100; //自动装箱 相当于 Integer integer3 = Integer.valueOf(100);
        Integer integer4 = 100;
        System.out.println(integer3 == integer4);

        Integer integer5 = 200; //自动装箱
        Integer integer6 = 200;
        System.out.println(integer5 == integer6);
    }
}
